This invention relates to a method and apparatus for detecting the motion vector used in picture encoding conforming to the MPEG (Moving Picture Image Coding Experts Group).
The MPEG system is such an encoding system for compressing moving picture data by combining DCT (discrete cosine transform) within a picture, inter-picture motion compensation prediction and variable length coding.
In general, motion vector detection in inter-picture motion compensation prediction is performed by so-called block matching. In this block matching, for a reference block composed of a pre-set number of pixels in a current or target picture being processed, an area in a reference picture having the same number of pixels as the pre-set number of pixels is extracted as a reference block, pointed by the motion vector, with the same position in the reference picture as the target block as a starting point. An absolute value of the difference of the pixels of the target block and the reference block is calculated and the sum of the absolute values of the differences is taken of the totality of pixels in the reference block for detecting the motion vector. In detecting the motion vector, the area to be extracted in a search area of the reference picture is moved pixel-by-pixel to perform the block matching repeatedly. The motion vector is detected with a point corresponding to the smallest value of the sum of the absolute values of the differences as the base or start point.
However, in performing the block matching, the search area of the reference picture in which the motion vector was found is of the same size as the search area of the target picture in which the motion vector was found. On the other hand, in finding the motion vector of the reference picture, the motion vector of the target picture was detected with an area of a constant pre-set size as a search area, using the motion vector of the reference picture as a reference, even if the motion vector of the reference picture is predictable to some extent.
In addition, the processing volume of the processing for finding the motion vector by the above-described block matching is tremendous in connection with the processing in the block matching for finding the sum of the absolute values of the differences. Thus, the majority of time of the picture compression processing in MPEG etc is consumed in this processing to present obstacles in implementing the software. Therefore, reduction of the processing volume has been a desideratum.
It is therefore a first object of the present invention to provide a motion vector detection method and apparatus whereby it is possible to reduce the processing volume in detecting the motion vector or a field picture of the interlaced canning system.
It is a second object of the present invention to provide a motion vector detection method and apparatus whereby it is possible to reduce the processing volume as detection accuracy in detecting the motion vector is maintained.
It is a third object of the present invention to provide a motion vector detection method and apparatus whereby it is possible to reduce the processing time and processing volume in detecting the motion vector as the number of times of block matching in detecting the motion vector is reduced.
As a result of perseverant researches towards accomplishing the above object, the present inventor has found that high correlation between the top filed picture and the bottom field picture in detecting the motion vector for the respective field pictures making up a moving picture can be exploited for motion vector prediction.
In connection with the above-mentioned first object, the present invention provides a motion vector detecting method and apparatus for detecting the motion vector in a field picture conforming to the interlaced scanning system including detecting a motion vector of a second field in a pre-set search range, using a first field picture, computing a search range for detecting the motion vector of a third field picture, by comparing a field-to-field distance between a field picture to be referred to and a third field picture and a field-to-field distance between the first field picture and a second field picture, and detecting a motion vector for a third field picture with the computed search range with a point indicated by the motion vector for the second field picture as a start point.
In this motion vector detection method and apparatus, the search area in detecting the motion vector for the field picture is set as it is changed using a motion vector of another field picture. The motion vector for the third field picture is detected by block matching in the search range thus set.
In connection with the above-mentioned second object, the present invention provides a motion vector detection method and apparatus including determining a first search range centered about a point specifying a motion vector of a reference block contained in a reference frame temporally or spatially proximate to a target frame, determining a second search range centered about a point obtained on elongating a motion vector of the reference block in dependence upon the frame-to-frame distance between a target frame and a reference frame, and computing picture data of a target block contained in the target frame and picture data of a reference block in the reference frame in a motion vector search range containing a first search range from the first range determining means and a second search range from the second search range to detect the motion vector of the reference block.
In this motion vector detection method and apparatus, the first search area is determined with the motion vector of the reference block as a start point, in detecting the motion vector of the target block, while the second search area is determined in accordance with the point elongated from the motion vector of the reference block to detect the motion vector of the target block in the motion vector search range containing the first and second search ranges.
The present inventor has conducted perseverant searches towards accomplishing the third object and found that the high correlation in the motion vectors of the neighboring pixel blocks in detecting the motion vector can be used in predicting the motion vector.
In connection with the third object, the present invention provides a motion vector detection method for detecting a motion vector for a picture composed of a plurality of blocks, including detecting a motion vector of a first block in a first search range, setting a second search range in detecting the motion vector of a second block based on a motion vector for the first blocks neighboring to the second block on either sides of the second block in the horizontal direction or vertical direction, and detecting the motion vector of the second block by block matching performed in the second search range.
In this motion vector detection method and apparatus, the motion vector of the first block is detected by performing block matching in the first search area, whilst the motion vector of the second block is detected by setting a second search area different in size from the pre-set search range using the motion vector of the neighboring first block to detect the motion vector for the second block.
Other objects and specific advantages provided by the present invention will be more apparent in detailed explanation of the embodiment as described below.